package BehavioralMode.command.canteen;

import java.util.Map;

public class Order {
     private Integer tableNum;
     private Map<String,Integer> menuList;

     private Chef chef = new Chef();

     public Order(Integer tableNum, Map<String, Integer> menuList) {
        this.tableNum = tableNum;
        this.menuList = menuList;
     }

     public void cooking(){
          System.out.println("第" + tableNum + "号桌的菜开始制作");

         menuList.forEach((key,value) -> {
             chef.cooking(key,value);
         });

         System.out.println("第" + tableNum + "号桌的菜完成制作");
     }

    public Map<String, Integer> getMenuList() {
        return menuList;
    }

    public Integer getTableNum() {
        return tableNum;
    }
}
